<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateSlidesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('slides', function(Blueprint $table)
		{
			$table->increments('id');
			$table->char('object_id', 36)->comment('objectId');
			$table->smallInteger('group')->default(0)->index('group_index')->comment('分组');
			$table->string('title', 100)->comment('标题');
			$table->string('description')->default('')->comment('描述');
			$table->string('target', 32)->default('_self')->comment('是否新建标签');
			$table->string('link')->comment('URL');
			$table->string('image')->comment('图片');
			$table->integer('order')->comment('排序');
			$table->string('status')->default('1')->comment('状态');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('slides');
	}

}
